﻿// <com.woyouqiu.Copyright>
// --------------------------------------------------------------
// <copyright>上海有求网络科技有限公司 2015</copyright>
// <Solution>Vecen.BangChuang</Solution>
// <Project>Vecen.BangChuang.Core</Project>
// <FileName>IFileStorage.cs</FileName>
// <CreateTime>2017-05-05 22:43</CreateTime>
// <Author>何苗</Author>
// <Email>hemiao@woyouqiu.com</Email>
// <log date="2017-05-05 22:43" version="00001">创建</log>
// --------------------------------------------------------------
// </com.woyouqiu.Copyright>

using System;
using System.Threading.Tasks;

namespace Vecen.BangChuang.BangChuang.DomainServices.Common {
    public interface IFileStorage {
        /// <summary>
        /// 保存
        /// </summary>
        /// <param name="fileBytes"></param>
        /// <returns></returns>
        Task<Guid> SaveFileAsync(byte[] fileBytes);

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="fileName"></param>
        /// <returns></returns>
        Task DeleteFileAsync(Guid fileName);

        /// <summary>
        /// 获取
        /// </summary>
        /// <param name="fileName"></param>
        /// <returns></returns>
        Task<byte[]> GetFileAsync(Guid fileName);
    }
}